package base;

import java.util.ArrayList;

public class Client {
	private ArrayList<Player> players = new ArrayList<Player>();

	void setPlayers(ArrayList<Player> players) {
		this.players = new ArrayList<Player>(players);
	}

	public ArrayList<Player> getPlayers() {
		return new ArrayList<Player>(players);
	}
	
	void setPlayer(Player player) {
		this.clear();
		this.addPlayer(player);
	}
	
	void addPlayer(Player player) {
		this.players.add(player);
	}
	
	void removePlayer(Player player) {
		this.players.remove(player);
	}

	void clear() {
		this.players = new ArrayList<Player>();
	}
	
	public boolean hasPlayer(Player player) {
		return this.players.contains(player);
	}
}
